{include h}
<div class="dashboard-header">
    <p class="sub-title">您已发布
        <span>{$data.threads}</span>篇文章作品<a href="{#WWW}post"><span class="new-post-btn">写文章</span></a></p>
</div>
<div class="dashboard-wrapper select-posts">
	<article class="panel panel-default archive" role="main">
        {foreach $thread_data as $v}
    	<article class="archive clr">
    	<h3>
    	       <a href="{php echo WWW.URL('thread',$v['id'],'');}" title="as dasd">{$v.title}</a>
    	</h3>
    	<div class="archive-excerpt">
    		<p>
    			{$v.summary}
    		</p>
    	</div>
    	<div class="postlist-meta">
    		<div class="postlist-meta-time">
    			<i class="fa fa-clock-o"></i>&nbsp;{$v.atime}
    		</div>

    		<div class="postlist-meta-category">
    			<i class="fa fa-folder-open"></i>&nbsp;<a href="{php echo WWW.URL('forum',$v['fid'],'');}" rel="category tag"><?php echo $forum[$v['fid']]['name']; ?></a>
    		</div>

    		<div class="postlist-meta-like like-btn" style="float:right;">
    			<i class="fa fa-thumbs-o-down"></i>&nbsp;<span>{$v.nos}</span>&nbsp;
    		</div>
    		<div class="postlist-meta-collect collect-btn collect-no" style="float:right;">
    			<i class="fa fa-thumbs-o-up"></i>&nbsp;<span>{$v.goods}</span>&nbsp;
    		</div>
    	</div>
    	</article>
        {/foreach}
        <div class="pagination">
            {if $pageid!=1}
    		<span class="pg-item">

                <a class="page-numbers" href="{php echo WWW.URL('my',$data['user'],EXP.'thread'.EXP.($pageid-1));}">上一页</a>
            </span>
            {/if}
            <?php $tmp = ($data['threads']%10) ?(intval($data['threads']/10)+1) : intval($data['threads']/10) ; ?>
            {for $i=($pageid-5 < 1) ? 1 : $pageid -5; $i< (($pageid + 5 > $tmp) ? $tmp+1 : $pageid + 5) ; $i++}


            <span class="pg-item ">
                <{if $pageid == $i}span{else}a{/if} class="page-numbers {if $pageid == $i}current{/if}" href="{php echo WWW.URL('my',$data['user'],EXP.'thread'.EXP.($i));}">
                    {$i}
                </{if $pageid == $i}span{else}a{/if}>
            </span>
            {/for}
            {if $pageid!=$page_count}
            <span class="pg-item" {if $pageid==1}disabled{/if}>
                <a class="next page-numbers" href="{php echo WWW.URL('my',$data['user'],EXP.'thread'.EXP.($pageid+1));}">下一页</a>
            </span>
            {/if}
    	</div>
	</article>
</div>
{include f}
